
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
 */
package tictactoe.GUI;

//~--- JDK imports ------------------------------------------------------------

import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;

import java.util.Locale;
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.swing.JFrame;
import javax.swing.LookAndFeel;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

/**
 *
 * @author Home
 */
public class playMain {
    private playMain() {}

    /**
     *
     * @param args
     */
    public static void main(String[] args) {
        try {
            LookAndFeel laf = (LookAndFeel) Class.forName(UIManager.getSystemLookAndFeelClassName()).newInstance();

            UIManager.setLookAndFeel(laf);
        } catch (InstantiationException ex) {
            Logger.getLogger(playMain.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            Logger.getLogger(playMain.class.getName()).log(Level.SEVERE, null, ex);
        } catch (UnsupportedLookAndFeelException ex) {
            Logger.getLogger(playMain.class.getName()).log(Level.SEVERE, null, ex);
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(playMain.class.getName()).log(Level.SEVERE, null, ex);
        }

        JFrame app = new JFrame();

        app.setLocationByPlatform(true);
        app.setLocale(Locale.US);
        app.setVisible(false);

        // NewMultiplayer nm = new NewMultiplayer(app);
        // nm.setVisible(true);
        // for (;;) {
        final NewMultiplayer nm = new NewMultiplayer(app);

        nm.setLocation(app.getLocation());
        nm.setVisible(true);
        nm.addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent e) {
                System.err.println("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
                System.exit(1);
                System.exit(0);
                System.err.println("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
                nm.dispose();
            }
        });

        // }
        // app.setVisible(false);
        // nm.setVisible(true);
        // app.setLocation(nm.getLocation());
        // app.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        // app.setVisible(true);
    }
}


//~ Formatted by Jindent --- http://www.jindent.com
